#include <ledParamTables.h>
/* Efficiency is 1024 @25C , the value is 990*1024/1000 when efficiency is 99.0% 

Based on the following rgb current measurement
RED=30mA,GREEN=30mA,BLUE=30mA

*/ 
static const TempParams_t TEMP_CURVE_TABLE_RED[TEMP_CMP_NUM_MAX] = 
{
    /*T(1C) efficiency deltaV(mV) x(%), y(%) */
/*0*/{1184U,33,1018U,1032U},
/*2*/{1170U,31,1019U,1031U},
/*4*/{1157U,28,1019U,1030U},
/*6*/{1143U,26,1020U,1030U},
/*8*/{1129U,22,1020U,1029U},
/*10*/{1115U,19,1021U,1028U},
/*12*/{1101U,16,1021U,1028U},
/*14*/{1087U,13,1022U,1027U},
/*16*/{1074U,11,1022U,1026U},
/*18*/{1060U,8,1022U,1026U},
/*20*/{1046U,5,1023U,1025U},
/*22*/{1032U,3,1023U,1024U},
/*24*/{1024U,0,1024U,1024U},
/*26*/{1016U,-3,1024U,1023U},
/*28*/{1008U,-8,1024U,1023U},
/*30*/{998U,-10,1024U,1022U},
/*32*/{989U,-13,1025U,1021U},
/*34*/{980U,-16,1025U,1021U},
/*36*/{972U,-20,1025U,1020U},
/*38*/{961U,-21,1025U,1020U},
/*40*/{951U,-24,1025U,1019U},
/*42*/{942U,-26,1026U,1019U},
/*44*/{932U,-29,1026U,1019U},
/*46*/{921U,-32,1026U,1018U},
/*48*/{911U,-35,1026U,1017U},
/*50*/{901U,-38,1027U,1017U},
/*52*/{890U,-41,1027U,1016U},
/*54*/{880U,-43,1027U,1016U},
/*56*/{870U,-47,1027U,1016U},
/*58*/{858U,-49,1027U,1015U},
/*60*/{848U,-52,1028U,1015U},
/*62*/{837U,-56,1028U,1014U},
/*64*/{826U,-59,1028U,1014U},
/*66*/{815U,-62,1028U,1013U},
/*68*/{804U,-66,1028U,1013U},
/*70*/{793U,-68,1029U,1012U},
/*72*/{782U,-72,1029U,1012U},
/*74*/{770U,-75,1029U,1011U},
/*76*/{759U,-78,1029U,1011U},
/*78*/{736U,-81,1029U,1010U},
/*80*/{715U,-84,1030U,1010U},
/*82*/{704U,-88,1030U,1010U},
/*84*/{690U,-90,1030U,1009U},
/*86*/{657U,-93,1030U,1008U},
/*88*/{646U,-96,1030U,1007U},
/*90*/{634U,-98,1030U,1007U},
/*92*/{622U,-103,1031U,1006U},
/*94*/{610U,-107,1031U,1006U},
/*96*/{599U,-111,1031U,1006U},
/*98*/{588U,-114,1031U,1005U},
/*100*/{578U,-118,1031U,1005U},
/*102*/{568U,-122,1031U,1005U},
/*104*/{558U,-124,1032U,1004U},
/*106*/{548U,-127,1032U,1004U},
/*108*/{538U,-133,1032U,1004U},
/*110*/{528U,-136,1032U,1003U},
/*112*/{517U,-138,1032U,1003U},
/*114*/{507U,-143,1032U,1003U},
/*116*/{497U,-148,1032U,1002U},
/*118*/{487U,-151,1033U,1002U},
/*120*/{477U,-155,1033U,1002U},



};

static const TempParams_t TEMP_CURVE_TABLE_GREEN[TEMP_CMP_NUM_MAX] = 
{
/*0*/{1036U,28,1005U,1027U},
/*2*/{1035U,26,1006U,1027U},
/*4*/{1034U,24,1008U,1027U},
/*6*/{1033U,22,1009U,1026U},
/*8*/{1032U,19,1011U,1026U},
/*10*/{1031U,15,1012U,1026U},
/*12*/{1030U,13,1014U,1025U},
/*14*/{1029U,11,1015U,1025U},
/*16*/{1028U,8,1017U,1025U},
/*18*/{1027U,6,1018U,1025U},
/*20*/{1026U,5,1020U,1024U},
/*22*/{1025U,3,1021U,1024U},
/*24*/{1024U,0,1024U,1024U},
/*26*/{1022U,-2,1025U,1023U},
/*28*/{1021U,-5,1027U,1023U},
/*30*/{1021U,-8,1029U,1022U},
/*32*/{1020U,-10,1032U,1022U},
/*34*/{1018U,-12,1033U,1021U},
/*36*/{1017U,-15,1036U,1021U},
/*38*/{1016U,-17,1039U,1020U},
/*40*/{1012U,-19,1043U,1019U},
/*42*/{1011U,-21,1048U,1018U},
/*44*/{1008U,-22,1052U,1017U},
/*46*/{1005U,-24,1056U,1016U},
/*48*/{1001U,-26,1061U,1015U},
/*50*/{999U,-28,1065U,1014U},
/*52*/{996U,-30,1069U,1013U},
/*54*/{993U,-33,1071U,1012U},
/*56*/{988U,-36,1078U,1011U},
/*58*/{984U,-36,1082U,1010U},
/*60*/{977U,-40,1088U,1009U},
/*62*/{970U,-42,1095U,1007U},
/*64*/{963U,-44,1101U,1005U},
/*66*/{958U,-45,1106U,1004U},
/*68*/{952U,-47,1112U,1003U},
/*70*/{947U,-49,1117U,1002U},
/*72*/{941U,-51,1123U,1001U},
/*74*/{935U,-53,1129U,1000U},
/*76*/{929U,-55,1134U,999U},
/*78*/{923U,-58,1140U,998U},
/*80*/{918U,-60,1145U,997U},
/*82*/{912U,-62,1151U,996U},
/*84*/{906U,-63,1156U,995U},
/*86*/{900U,-65,1162U,994U},
/*88*/{894U,-67,1167U,993U},
/*90*/{889U,-67,1173U,992U},
/*92*/{883U,-70,1178U,991U},
/*94*/{877U,-72,1184U,990U},
/*96*/{871U,-74,1189U,989U},
/*98*/{865U,-76,1195U,988U},
/*100*/{860U,-77,1200U,987U},
/*102*/{854U,-80,1206U,986U},
/*104*/{848U,-82,1211U,986U},
/*106*/{842U,-84,1217U,985U},
/*108*/{837U,-86,1222U,984U},
/*110*/{831U,-89,1228U,983U},
/*112*/{825U,-91,1234U,982U},
/*114*/{819U,-94,1239U,981U},
/*116*/{813U,-95,1245U,980U},
/*118*/{808U,-97,1250U,979U},
/*120*/{802U,-98,1256U,978U},



};

static const TempParams_t TEMP_CURVE_TABLE_BLUE[TEMP_CMP_NUM_MAX] = 
{
    /*T(1C) efficiency deltaV(mV) x(%), y(%) */
/*0*/{986U,27,1032U,965U},
/*2*/{989U,25,1031U,969U},
/*4*/{992U,23,1031U,974U},
/*6*/{995U,21,1030U,979U},
/*8*/{999U,18,1029U,984U},
/*10*/{1002U,16,1029U,989U},
/*12*/{1005U,13,1028U,994U},
/*14*/{1008U,11,1027U,999U},
/*16*/{1011U,8,1026U,1004U},
/*18*/{1014U,6,1026U,1009U},
/*20*/{1017U,4,1025U,1014U},
/*22*/{1020U,3,1024U,1019U},
/*24*/{1024U,0,1024U,1024U},
/*26*/{1027U,-2,1023U,1028U},
/*28*/{1030U,-5,1022U,1036U},
/*30*/{1032U,-7,1021U,1038U},
/*32*/{1034U,-8,1021U,1043U},
/*34*/{1037U,-10,1020U,1051U},
/*36*/{1040U,-13,1019U,1055U},
/*38*/{1043U,-16,1018U,1060U},
/*40*/{1045U,-19,1018U,1068U},
/*42*/{1049U,-20,1017U,1073U},
/*44*/{1050U,-21,1016U,1078U},
/*46*/{1052U,-23,1016U,1085U},
/*48*/{1055U,-24,1015U,1090U},
/*50*/{1055U,-26,1015U,1090U},
/*52*/{1058U,-28,1014U,1097U},
/*54*/{1058U,-29,1014U,1097U},
/*56*/{1061U,-32,1013U,1105U},
/*58*/{1061U,-34,1013U,1105U},
/*60*/{1064U,-37,1012U,1112U},
/*62*/{1064U,-40,1011U,1112U},
/*64*/{1065U,-42,1011U,1119U},
/*66*/{1065U,-44,1011U,1119U},
/*68*/{1067U,-46,1011U,1124U},
/*70*/{1067U,-49,1010U,1124U},
/*72*/{1068U,-51,1010U,1132U},
/*74*/{1068U,-54,1009U,1132U},
/*76*/{1070U,-56,1009U,1139U},
/*78*/{1070U,-58,1008U,1139U},
/*80*/{1071U,-60,1008U,1146U},
/*82*/{1071U,-62,1008U,1146U},
/*84*/{1072U,-64,1008U,1154U},
/*86*/{1072U,-65,1007U,1154U},
/*88*/{1074U,-67,1007U,1161U},
/*90*/{1074U,-69,1006U,1161U},
/*92*/{1075U,-71,1006U,1168U},
/*94*/{1075U,-74,1006U,1168U},
/*96*/{1076U,-75,1006U,1176U},
/*98*/{1076U,-77,1005U,1176U},
/*100*/{1077U,-79,1005U,1183U},
/*102*/{1077U,-81,1004U,1183U},
/*104*/{1079U,-85,1004U,1190U},
/*106*/{1079U,-86,1003U,1190U},
/*108*/{1080U,-88,1003U,1198U},
/*110*/{1080U,-91,1003U,1198U},
/*112*/{1081U,-93,1003U,1205U},
/*114*/{1081U,-96,1002U,1205U},
/*116*/{1083U,-99,1002U,1213U},
/*118*/{1083U,-99,1001U,1213U},
/*120*/{1084U,-101,1001U,1220U},

};


TempParams_t const * LP_GetTempTableRed(LedNum_t ledIndex)
{
    return TEMP_CURVE_TABLE_RED;
}

TempParams_t const * LP_GetTempTableGreen(LedNum_t ledIndex)
{
    return TEMP_CURVE_TABLE_GREEN;
}

TempParams_t const * LP_GetTempTableBlue(LedNum_t ledIndex)
{
    return TEMP_CURVE_TABLE_BLUE;
}


/*
const AccurateColorXYY_t calibratedColortable[] = 
{
  {21845, 21845, 100, 255,255,255},
  {X0, Y0, 100, 254,254,255},
};
*/



